@extends("backend.layout.main")


@section("after.css")

    <link type="text/css" href="/backend/css/common.css" rel="Stylesheet">
    <link type="text/css" href="/backend/css/style.css" rel="Stylesheet">
    <link type="text/css" href="/backend/css/style2.css" rel="Stylesheet">
    <link type="text/css" href="/backend/css/project.css" rel="Stylesheet">
    <link type="text/css" href="/backend/css/header.css" rel="Stylesheet">



@endsection

@section("right_content")
    <!--middle-->
    <div class="mainWrapBox">
        <div class="mainBox">
            
<h1>
    <a href="/backend/items">项目</a> / {{ $itemsInfo['item_name'] }}
<span class="projects-nav">

<a class="current-nav" href="/backend/work/download/{{ $itemsInfo['id'] }}">文档</a>
    <a href="/backend/items/task/{{ $itemsInfo['id'] }}">任务</a>
    <a  href="/backend/items/show/{{ $itemsInfo['id'] }}">基本信息</a>
</span></h1>

<div class="html">
    <div class="w220 f_l" id="task-list-left">
        <div class="listWrapbox mt10" id="main-left" style="height: 860px;">
            <div>
                <h2>文件夹</h2>
                <ul style="margin-top: 8px;">
                    <li><a href="###">
                            <img src="/backend/images/add.png">
                    <div style="text-align: center">全部</div></a></li>
                </ul>
            </div>
            <div style="border-top: 1px solid #ccc;margin-top: 80px;">
            </div>
            <div>
                <ul style="width:100%;margin-top:10px;">
                <li class="delete-icon"  data-id="0"style="width: 50%">
                        <img src="/backend/images/folder_ico.jpg">
                    <div  style="max-width:80px;" title="待审核">待审核</div></li>
                <li class="delete-icon"  data-id="1" style="width: 50%">
                        <img src="/backend/images/add.png">
                    <div  style="max-width:80px;" title="成果文件">成果文件</div></li>
                
            </ul></div>
        </div>
    </div>


    <div class="auto-width-220" id="task-list-right">
        <div class="proect-list-wrap-box mt10" id="main-right" style="min-height: 562px; height: 860px;">
            <div class="project-task-list" style="margin-right: 0px;padding-right:40px;">
                <input type="hidden" name="start" id="start" value="0">
                <input type="hidden" name="limit" id="limit" value="20">
                <input type="hidden" id="inOrOut">
                <input type="hidden" id="fileType">
                <h2 style="margin-bottom: 12px;">
                    <a class="" style="width:auto;background:none; display:inline; color:#000;" href="#">全部</a>

                </h2>
                <div class="task_ser" style="height: 0px;border-bottom: 0px solid #ccc;">
                    <div class="drop-select-container mr30 clearfix">
                        <div class="drop-select h30">
                            <dl class="task-situation all-select-check-box chuangjiangwenjian" style="border-top: 0px solid #ccc;padding: 0px 0;">
                                <dt class="chuangjiangwenjian"><i class="default-checkbox i-checkbox chuangjiangwenjian" onclick="allchuangjianwenjian(this)"><em class="chuangjiangwenjian"></em></i></dt>
                            </dl>
                        </div>
                    </div>
                    <div class="drop-select-container mr30 clearfix">
                        <div data-toggle="drop-select" class="drop-select h30">子项：
                        <select>
                            <option value="0">全部</option>
                            <option value="1">默认</option>
                        </select>
                        </div>
                    </div>
                    <div class="drop-select-container mr30 clearfix">
                        <div data-toggle="drop-select" class="drop-select h30">专业：
                        <select>
                            <option value="0">全部</option>
                            <option value="1">默认</option>
                        </select>
                        </div>
                    </div>
                    <div class="drop-select-container mr30 clearfix">
                        <div data-toggle="drop-select" class="drop-select h30">文件类型：
                        <select>
                            <option value="0">全部</option>
                            <option value="1">输入</option>
                            <option value="2">输出</option>
                        </select>
                        </div>
                    </div>
                    <div class="f_r" style="margin-right:-30px;display: none;" >
                        <div class="drop-select-container mr30 clearfix">
                            <div class="drop-select h30" style="margin-top:1px;">
                                <span class="search_divs" style="font-size:12px;">
                            <input placeholder="搜索" class="input" type="text" id="keywords" >
                            <input type="button" class="icon-search" >
                        </span></div>
                        </div>
                    </div>
                </div>

                <div id="dataGrid">
﻿<div class="task-list" style="min-height:0px;overflow-y:visible;">
      @if(!empty($arr[0]))
       @foreach($arr[0] as $k=>$v)
       <div style="display: none;" class="dai" >
       <h1>{{$k}}</h1>
 @foreach( explode(',',trim($v->path,',') ) as $k=>$i )


        <ul  style="width:100%; ">
            <li class="trash"><div class="dores_m" style="width: 100%;">
                <table cellpadding="0" cellspacing="0" class="xianmu_table" style="display:block;width: 100%;">
                    <tbody><tr onmousemove="up_dat(this);" onmouseout="dow_dat(this);" style="width: 100%; background: inherit;">
                        <td class="chuangjiangwenjian">
                            <dl class="task-situation select-check-box chuangjiangwenjian" style="border-top: 0px solid #ccc;padding: 0px 0;margin-top: -10px;">
                            <dt class="chuangjiangwenjian"><i class="default-checkbox i-checkbox chuangjiangwenjian" onclick="chuangjianwenjian(this)"><em id="em-2259" class="chuangjiangwenjian" data="2259" ></em></i></dt>
                        </dl>
                        </td>
                        <td width="100" valign="top" align="center"><div class="dores_pic" style="margin-top:10px;">
                             <!-- 文件夹 -->
                            <a href="http://www.xcube.com.cn/doc/index.htm?projectId=420&amp;pid=2259">
                                                         <!-- 文件夹 -->
                       <img src="/backend/images/<?php echo substr(strrchr($i,"."),1); ?>.png">

                            </a>
                        </div></td>
                        <td width="30"></td>
                        <td width="700" valign="top">



                            <div class="add_titles_xm" style="margin-top:10px;">
                                <input type="text" readonly="readonly" name="file_name_value" onblur="saveNode(2259)" id="fileName_2259" style="margin-left:-5px;font-size: 12px;width:320px;color:#808080;font-weight:800;" class="left" value="{{ trim($i,',') }}">

                                <input type="hidden" id="mr_fileName_2259" value="沟通记录">
                            </div>



                            <ul class="add_tables">
                                <li>上传时间:&nbsp;&nbsp;&nbsp;{{ $v->created_at }}</li>
                                <li>
                                </li>
                            </ul><span style="float: right;margin-top: -56px;"></span>
                        </td>
                        <td width="150" valign="middle">
                            <ul class="caozuo_xianmu" style="float: none; width: 100px; opacity: 0;">
                                    <li class="down_xm"><a href="/backend/uploads/{{ $v->item_id }}/{{ $v->item_task_id  }}/{{ $i }}">下载</a></li>
                            </ul>
                        </td>
                    </tr>
                </tbody></table>
                </div>
            </li>
        </ul>

              @endforeach
              </div>
              @endforeach
              @endif



           @if(!empty($arr[1]))
           @foreach($arr[1] as $k=>$v)
          <div class="cheng">
          <h1>{{$k}}</h1>
               @foreach( explode(',',trim($v->path,',') ) as $k=>$i )
                   <ul class="dragsort" style="width:100%;">
                       <li class="trash"><div class="dores_m" style="width: 100%;">
                               <table cellpadding="0" cellspacing="0" class="xianmu_table" style="display:block;width: 100%;">
                                   <tbody><tr onmousemove="up_dat(this);" onmouseout="dow_dat(this);" style="width: 100%; background: inherit;">
                                       <td class="chuangjiangwenjian">
                                           <dl class="task-situation select-check-box chuangjiangwenjian" style="border-top: 0px solid #ccc;padding: 0px 0;margin-top: -10px;">
                                               <dt class="chuangjiangwenjian"><i class="default-checkbox i-checkbox chuangjiangwenjian" onclick="chuangjianwenjian(this)"><em id="em-2259" class="chuangjiangwenjian" data="2259" ></em></i></dt>
                                           </dl>
                                       </td>
                                       <td width="100" valign="top" align="center"><div class="dores_pic" style="margin-top:10px;">
                                               <!-- 文件夹 -->
                                               <a href="http://www.xcube.com.cn/doc/index.htm?projectId=420&amp;pid=2259">
                                                   <!-- 文件夹 -->
                                                   <img src="/images/add.png">
                                               </a>
                                           </div></td>
                                       <td width="30"></td>
                                       <td width="700" valign="top">



                                           <div class="add_titles_xm" style="margin-top:10px;">
                                               <input type="text" readonly="readonly" name="file_name_value" onblur="saveNode(2259)" id="fileName_2259" style="margin-left:-5px;font-size: 12px;width:320px;color:#808080;font-weight:800;" class="left" value="{{ trim($i,',') }}">
                                               <input type="hidden" id="mr_fileName_2259" value="沟通记录">
                                           </div>



                                           <ul class="add_tables">
                                               <li>上传时间:&nbsp;&nbsp;&nbsp;{{ $v->created_at }}</li>
                                               <li>
                                               </li>
                                           </ul><span style="float: right;margin-top: -56px;"></span>
                                       </td>
                                       <td width="150" valign="middle">
                                           <ul class="caozuo_xianmu" style="float: none; width: 100px; opacity: 0;">
                                               <li class="down_xm"><a href="/backend/uploads/{{ $v->item_id }}/{{ $v->item_task_id  }}/{{ $i }}">下载</a></li>
                                           </ul>
                                       </td>
                                   </tr>
                                   </tbody></table>
                           </div>
                       </li>
                   </ul>

               @endforeach
           </div>
           @endforeach

@endif
</div>



                </div>
            </div>
        </div>
    </div>

</div>
        </div>
    </div>
</div>
</div>
<script type="text/javascript" src="/backend/js/jquery.min.js"></script>
<script type="text/javascript">
    $('.delete-icon').click(function(){
       var id=$(this).data('id');
        if(id==0){
            $('.dai').show();
            $('.cheng').hide();
        }else{
            $('.cheng').show();
            $('.dai').hide();
        }
    })

function up_dat(obj){ 
    var sum=$(obj).find("span").length;
    $(obj).css("background","#f8f8f8");
    for(var i=0;i<sum;i++){ 
        var sdata=$(obj).find(".add_titles_xm").find("span").eq(i).attr("data");
        if(sdata=="on"){ 
            $(obj).find(".add_titles_xm").find("span").eq(i).css("visibility","visible");
             
        }else{ 
            $(obj).find(".add_titles_xm").find("span").eq(i).css("visibility","hidden");
             
        }
    }
    $(obj).find(".caozuo_xianmu").css("opacity","1");
}

function dow_dat(obj){ 
    $(obj).find(".add_titles_xm").find("span").css("visibility","hidden");
    $(obj).css("background","inherit");
    $(obj).find(".caozuo_xianmu").css("opacity","0");
}
function chuangjianwenjian(obj) {
    if($(obj).children().hasClass('checked')){
        $(obj).children().removeClass('checked');
    }else{
       $(obj).children().addClass('checked');
    }

}
function allchuangjianwenjian(obj) {
   if($(obj).children().hasClass('checked')){
    $(obj).children().removeClass('checked');
    $('dt[class=chuangjiangwenjian] i').find('em').removeClass('checked');
  }else{
   $(obj).children().addClass('checked');
   $('dt[class=chuangjiangwenjian] i').find('em').addClass('checked');
  }
 
}

$('dt[class=chuangjiangwenjian] i').click(function(){
   
})
</script>

@endsection
